/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.yug.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 视频链接维护Entity
 * @author Jeff
 * @version 2016-12-04
 */
public class YugVideo extends DataEntity<YugVideo> {
	
	private static final long serialVersionUID = 1L;
	private String url;		// 视频地址
	private String pic;		// 视频略缩图地址
	private String name;		// 名称
	private String description;		// 相关描述，展示在页面中
	
	private YugCategory category;
	
	public YugVideo() {
		super();
	}

	public YugVideo(String id){
		super(id);
	}

	@Length(min=0, max=1000, message="视频地址长度必须介于 0 和 1000 之间")
	@ExcelField(title="视频链接", align=2, sort=40)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	@Length(min=0, max=1000, message="视频略缩图地址长度必须介于 0 和 1000 之间")
	@ExcelField(title="图片链接", align=2, sort=30)
	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}
	
	@Length(min=0, max=200, message="名称长度必须介于 0 和 200 之间")
	@ExcelField(title="视频名", align=2, sort=10)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=1000, message="相关描述，展示在页面中长度必须介于 0 和 1000 之间")
	@ExcelField(title="视频简介", align=2, sort=20)
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public YugCategory getCategory() {
		return category;
	}

	public void setCategory(YugCategory category) {
		this.category = category;
	}
	@ExcelField(title="视频类型", align=2, sort=10)
	public String getCategoryName(){
		return category==null?"":category.getName();
	}
}